﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CommonLibrary.DataModel.WorkFlow
{
    public class WfTaskEntity
    {
        /*注释: 删除以下字段*/
        //public int step_id { set; get; }


        /// <summary>
        /// 序号
        /// </summary>
        public int task_id { set; get; }
        /// <summary>
        /// 上一步任务id
        /// </summary>
        public int ptask_id { get; set; }
        /// <summary>
        /// Guid
        /// </summary>
        public Guid uniqueid { set; get; }
        /// <summary>
        /// 任务名 对应 statename
        /// </summary>
        public string taskname { set; get; }
        /// <summary>
        /// 状态
        /// </summary>
        public string state { set; get; }
        /// <summary>
        /// 处理人
        /// </summary>
        public int user_id { set; get; }
        /// <summary>
        /// 处理类型
        /// </summary>
        public string processtype { get; set; }
        /// <summary>
        /// 处理意见 2012-05-17 mlh +
        /// </summary>
        public string task_clyj { set; get; }
        /// <summary>
        /// 处理结果
        /// </summary>
        public string processresult { set; get; }
        /// <summary>
        /// 处理备注
        /// </summary>
        public string processaddition { set; get; }
        /// <summary>
        /// 发起人
        /// </summary>
        public int fqrcode { set; get; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public String starttime { set; get; }
        /// <summary>
        /// 查收时间
        /// </summary>
        public String checkintime { set; get; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public String endtime { set; get; }
        /// <summary>
        /// 时间长度
        /// </summary>
        public int days { set; get; }

        /// <summary>
        ///  是否已经查看
        /// </summary>
        public Int32 isread { get; set; }
    }

    public class WfTaskDetailEntity : WfTaskEntity
    {
        /// <summary>
        /// 处理人名称
        /// </summary>
        public String user_name { set; get; }
        /// <summary>
        /// 发起人名称
        /// </summary>
        public String fqrname { get; set; }
        /// <summary>
        /// 发起人部门
        /// </summary>
        public int fqrdep { get; set; }
        /// <summary>
        /// 发起人部门名称
        /// </summary>
        public string fqrdepname { get; set; }

        /// <summary>
        /// 任务相关的流程,不知道什么用的
        /// </summary>
        /// public WfInstance taskRefInstance { set; get; }

        /// <summary>
        /// 审批任务标志,不知道什么用的
        /// </summary>public string sprwFlag { set; get; }
    }

    public class WfTaskQuery : WfTaskEntity
    {
        /// <summary>
        /// 赋予开始时间结束范围
        /// </summary>
        public string taskSetime { set; get; }

    }

    /// <summary>
    /// 任务状态
    /// </summary>
    public static class WfTaskState
    {
        public static string TASK_START = "发起";
        public static string TASK_UNDO = "未处理";
        //public static string TASK_EXECUTING = "处理中";
        public static string TASK_FINISHED = "已处理";
        //public static string TASK_ABOLISH = "已废除";
    }

    /// <summary>
    /// 任务处理结果
    /// </summary>
    public static class WfTaskResult
    {
        public static string TASK_AGREE = "同意";
        public static string TASK_UNAGREE = "不同意";
    }
}
